package edu.zut.hys.base.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import edu.zut.hys.base.service.UserService;
import edu.zut.hys.base.entity.User;
import edu.zut.hys.base.mapper.UserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
* @author houyingsheng
* @description 针对表【user】的数据库操作Service实现
* @createDate 2023-01-05 23:28:37
*/
@Service
public class UserServiceImpl extends ServiceImpl<UserMapper, User>
    implements UserService {
    @Autowired
    UserMapper userMapper;

    @Override
    public User getOneByUsername(String username){
        return userMapper.selectOne(new QueryWrapper<User>().eq("username",username));
    }
}




